package com.lvan.service.interfaze;

import java.io.Serializable;
import java.util.List;

import com.lvan.bean.BaseException;
import com.lvan.bean.Page;

public interface IService<T> {
	/**
	 * 请求参数错误
	 */
	public static final int REQUEST_PARAM_ERROR = 7;
	/**
	 * 违反唯一约束
	 */
    public static final int UNIQUE_ERROR = 8;
    /**
	 * 未登录
	 */
    public static final int UNLOGIN = 9;
    /**
	 * 主键ID不能为空
	 */
    public static final int PK_ID_REQUIRED = 10;
	public void add(T t) throws BaseException;
	public void delete(Serializable ids) throws BaseException;
	public void update(T t) throws BaseException;
	public T getByID(Serializable id);
	public int count(T t);
	public List<T> query(T t, Page page);
}
